<?php
/**
* Bysoft
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com and you will be sent a copy immediately.
*
* @category   Bysoft
* @package    Bysoft_Flashnavigator
* @author     Bysoft
* @copyright  Copyright (c) 2009 Bysoft (http://www.bysoft.fr)
* @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
*/ 

class Bysoft_Flashnavigator_Model_Flashnavigator extends Mage_Core_Model_Abstract
{
    private $config_file;
	
	public function _construct()
    {
        parent::_construct();
        $this->_init('flashnavigator/flashnavigator');
        
        $this->config_file = "media/slideshow/config.php";
    }
    
    public function loadConfig()
    {
    	$config = array();
    	if( file_exists( $this->config_file ) ){
    		$config = include $this->config_file;
    	}
    	return $config;
    }
    
    public function saveConfig( $config )
    {
    	file_put_contents( $this->config_file,"<?php return ".var_export( $config,true ).";" );
    	return;
    }
}